/*!
\file EdgeList.h
\brief Contains declaration of EdgeList.
\ingroup Graph
*/

#include<QList> 
#include"Edge.h"

//WARNING: This class should not be used by users of this project. The only time a user encounters it is by calling operator[][] on a graph. Its usage is explained there.

/*!
\class EdgeList
\brief A convenience class representing a list of Edges. This class is encountered when operator[] is called on Graph.
\warning This class should not be used by users of this project, other than through calling [][] on Graph.
\ingroup Graph
*/

class EdgeList{
public:
	EdgeList( bool isDirected );
	//!< Constructor. Must know if these Edges belong to a directed graph or not.
	void add( Edge e ){ m_edges.push_back(e); }
	//!< Add an Edge to this list.
	int operator[](int i)const;
	//!< Returns id of Edge that ends in Node with id i.
private:
	QList<Edge> m_edges;
	bool m_isDirected;
};
